package payroll25.classification;

import java.util.LinkedHashMap;
import java.util.Map;

import payroll25.PaymentClassification;
import payroll25.trans.SalesReceipt;

public class CommissionedClassification implements PaymentClassification{

    private Double salary;
    private Double commissionRate;
    private Map<String, SalesReceipt> salesReceipts = new LinkedHashMap<>();

    public CommissionedClassification(Double salary, Double commissionRate) {
        this.salary = salary;
        this.commissionRate = commissionRate;
    }

    public double getSalary() {
        return salary;
    }

    public double getCommissionRate() {
        return commissionRate;
    }

    public SalesReceipt getSalesReceiptOfDate(String date) {
        return salesReceipts.get(date);
    }

    public void addSalesReceipt(SalesReceipt sr) {
        salesReceipts.put(sr.getDate(), sr);
    }

}
